﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;

namespace Spencen.Mobile.UI.Behaviors
{
    // Don't use this generic class because if causes the error described here:
    // https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=339259&wa=wsignin1.0
    internal class Behavior<T> : Behavior where T: DrawingElement
    {
        #region IBehavior Members

        public override void OnAttached( DrawingElement target )
        {
            OnAttached( (T)target );
        }

        public override void OnDettached( DrawingElement target )
        {
            OnDettached( (T)target );
        }

        #endregion
    }

    public interface IBehavior
    {
        void OnAttached( DrawingElement target );
        void OnDettached( DrawingElement target );
    }
}
